#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 2020;

int n;
int f[N][N];
char str[N];

int calc(int l, int r, int a, int b){
    if(f[l][r] != 0){
        return f[l][r];
    }

    if(str[a] < str[b]){
        return 1;
    }else if(str[a] == str[b]){
        return 0;
    }else{
        return -1;
    }
}

void solve(){
    scanf("%s", str + 1);
    n = strlen(str + 1);
    for(int i = 0; i <= n; i ++){
        for(int j = 0; j <= n; j ++){
            f[i][j] = 0;
            }
    }

    // -1 Bob 0 draw 1 Alice
    for(int len = 2; len <= n; len += 2){
        for(int l = 1; l + len - 1 <= n; l ++){
            int r = l + len - 1;
            if(len == 2){
                if(str[l] != str[r]) f[l][r] = 1;
                else f[l][r] = 0;
            }else{
                f[l][r] = max(min(calc(l + 2, r, l, l + 1), calc(l + 1, r - 1, l, r)), min(calc(l + 1, r - 1, r, l), calc(l, r - 2, r, r - 1)));
            }

         //   cout << "f[" << l << "][" << r << "] = " << f[l][r] << endl;
        }
    }

    if(f[1][n] == 1){
        cout << "Alice" <<'\n';
    }else if(f[1][n] == 0){
        cout << "Draw" << '\n';
    }else{
        cout << "Bob" << '\n';
    }

}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);


    int T;
    cin >> T;
    while(T--){
        solve();
    }


    return 0;
}